package com.doerit.laptops.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.doerit.laptops.entity.Staff;

public interface StaffMapper {
    
    int deleteByPrimaryKey(Integer id);

    int insert(Staff record);

    int insertSelective(Staff record);

    Staff selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Staff record);

    int updateByPrimaryKey(Staff record);

    
    @Select("SELECT * FROM staff")
	List<Staff> findAll();

    @Select("SELECT * FROM staff WHERE EMAIL= #{email}")
	List<Staff> findByEmailAddress(@Param("email")String email);

    @Select("SELECT * FROM staff WHERE EMAIL= #{email} AND PASSWORD = #{password} ")
	List<Staff> findByEmailAndPassword(@Param("email")String email, @Param("password")String password);
}